import service from "@/util/service";

// 获取商品
export function getGoodType(params:any={
    type:1,
    pagenum:1,
    pagesize:5
}){
    return service({
        url:"categories",
        method:"get",
        params
    })
}

// 获取列表
export function getGood(params={
    query:"",
    pagenum:1,
    pagesize:10
}){
    return service({
        url:"goods",
        method:"get",
        params
    })
}

// 添加列表
export function addGood(data:{
    goods_name:string;
    goods_price:string;
    goods_cat:string;
    goods_number:string;
    goods_weight:string;
}){
    return service({
        url:"goods",
        method:"post",
        data
    })
}